/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.proteu.hibernate.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 *
 * @author ricardo
 */
@Entity
@Table(name="BRAMEDICAMENTOSUBSTANCIAS")
public class BraMedicamentoSubstanciasProteu implements Serializable{

    @Id
    @Column(name="BRAMEDSUBCODIGOSUB")
    private Integer braMedSubCodigoSub;
    @Id
    @Column(name="BRAMEDSUBCODIGOMED")
    private String braMedSubCodigoMed;

    public String getBraMedSubCodigoMed() {
        return braMedSubCodigoMed;
    }

    public void setBraMedSubCodigoMed(String braMedSubCodigoMed) {
        this.braMedSubCodigoMed = braMedSubCodigoMed;
    }

    public Integer getBraMedSubCodigoSub() {
        return braMedSubCodigoSub;
    }

    public void setBraMedSubCodigoSub(Integer braMedSubCodigoSub) {
        this.braMedSubCodigoSub = braMedSubCodigoSub;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final BraMedicamentoSubstanciasProteu other = (BraMedicamentoSubstanciasProteu) obj;
        if (this.braMedSubCodigoSub != other.braMedSubCodigoSub && (this.braMedSubCodigoSub == null || !this.braMedSubCodigoSub.equals(other.braMedSubCodigoSub))) {
            return false;
        }
        if ((this.braMedSubCodigoMed == null) ? (other.braMedSubCodigoMed != null) : !this.braMedSubCodigoMed.equals(other.braMedSubCodigoMed)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 61 * hash + (this.braMedSubCodigoSub != null ? this.braMedSubCodigoSub.hashCode() : 0);
        hash = 61 * hash + (this.braMedSubCodigoMed != null ? this.braMedSubCodigoMed.hashCode() : 0);
        return hash;
    }


}
